package com.ziyun.erp.modules.order.vo;

import com.ziyun.erp.common.e.order.ProductionStatusEnum;
import com.ziyun.erp.common.e.production.FinanceStatusEnum;
import com.ziyun.erp.common.utils.EnumUtil;
import lombok.Getter;
import lombok.Setter;

/**
 * 已分配订单信息
 * @author gaosheng
 * @date 2018-11-07 9:54
 */
@Getter
@Setter
public class OriginalRelevanceVo {

    /**
     * 被分配订单号
     */
    private String originalOrderNo;
    /**
     * 分配订单号
     */
    private String orderAllotNo;
    /**
     * 商品名称
     */
    private String name;
    /**
     * 订单生产状态
     */
    private Integer productionStatus;
    /**
     * 订单生产状态
     */
    private String productionStatusText;

    public String getProductionStatusText() {
        if (productionStatus == null){
            return ProductionStatusEnum.UN_AUDITED.toInt() + "";
        }
        return EnumUtil.getEnumByCodeInt(ProductionStatusEnum.class, productionStatus).toDescribe();
    }

    /**
     * 财务审核状态
     */
    private Integer financeStatus;
    /**
     * 财务审核状态
     */
    private String  financeStatusText;

    public String getFinanceStatusText() {
        if (financeStatus == null){
            return FinanceStatusEnum.UN_AUDITED.toCode();
        }
        return EnumUtil.getEnumByCodeInt(FinanceStatusEnum.class, financeStatus).toDescribe();
    }
}
